﻿<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>武汉理工大学计算机协会维修预约系统</title>

    <script type="text/javascript" src="MyString.js"></script>

    <script type="text/javascript" src="XmlObject.js"></script>

    <script type="text/javascript" src="/js/jquery-1.10.2.min.js"></script>
    

    <script language="JavaScript" type="text/javascript">
        function checkInput() {
            var sdName = sName.value;
            var sdPhone = sPhone.value; //50
            var sdPlace = sPlace.value; //
            var sdSex = sex[sex.selectedIndex].value; //10
            var sdQueryCode = querycode.value;
            var sdDescribe = describe.value;
            if (checkLength(sdName, 50) == false) return false;
            if (checkLength(sdPhone, 50) == false) return false;
            if (checkLength(sdSex, 10) == false) return false;
            if (checkLength(sdName, 50) == false) return false;
        }
        function onSubmitClick() {
            checkInput();
            var sdName = sName.value;
            var sdPhone = sPhone.value; //50
            var sdPlace = sPlace.value; //
            var sdSex = sex[sex.selectedIndex].value; //10
            var sdQueryCode = querycode.value;
            var sdDescribe = describe.value;
            $.ajax({
                url: "thj.asp",
                data: {
                    Action: "new",
                    Name: sdName,
                    Phone: sdPhone,
                    Place: sdPlace,
                    Sex: sdSex,
                    QueryCode: sdQueryCode,
                    Describe: sdDescribe
                },
                success: function(data) {
                    var oData = eval("(" + data + ");");
                    if (oData.msg == 'ok') {
                        query_code.innerHTML = '<b>' + oData.code + '</b>';
                        fullmask.style.display = "block";
                        message.style.display = "block";
                    }
                    else {
                        alert("出现未知错误，请稍后重试！");
                    }
                }
            });
        }
        function checkLength(sText, nLenLimit) {
            if (sText.length > nLenLimit) return false;
            return true;
        }
        window.onload = function() {
            message.style.display = "none";
            fullmask.style.display = "none";
        }
        function closeDiv() {
            message.style.display = "none";
            window.location = "index.asp"
            return true;
        }
        function closeThisDiv() {
            PublicMsg.style.display = "none";
            return true;
        }
        function acceptRqt(nID) {
            $.ajax({
                url: "thj.asp",
                data: {
                    Action: "accept",
                    RequestID: nID
                },
                success: function(data) {
                    var oData = eval("(" + data + ");");
                    if (oData.msg == 'ok') {
                        setMessage("项目承接概况",
                        "同学姓名：<b>" + oData.name + "</b><br />" +
                        "&nbsp;&nbsp;&nbsp;&nbsp;联系电话：<b>" + oData.telphone + "</b><br />" +
                        "&nbsp;&nbsp;&nbsp;&nbsp;联系地址：<b>" + oData.location + "</b><br />" +
                        "&nbsp;&nbsp;&nbsp;&nbsp;故障描述：<b>" + oData.describe + "</b>"
                        , function() {
                            window.location = "index.asp";
                        });
                    }
                    else {
                        alert(oData.param);
                    }
                }
            });
        }
        var afterFunction;
        function setMessage(sTitle, sContent, afterClose) {
            p_msg_title.innerHTML = sTitle;
            p_msg_area.innerHTML = sContent;
            PublicMsg.style.display = "block";
            afterFunction = afterClose;
        }
        function closeMessage() {
            PublicMsg.style.display = "none";
            debugger;
            afterFunction();
            return true;
        }
    </script>

    <style type="text/css">
        .text_input
        {
            width: 100%;
        }
        .text_area
        {
            width: 100%;
            height: 100px;
        }
        .login
        {
            font-size: 15px;
        }
        #Radio1
        {
            width: 20px;
        }
        #Select1
        {
            width: 212px;
        }
        .fulldiv
        {
            position: absolute;
            background-color: Gray;
            left: 0px;
            right: 0px;
            top: 0px;
            height: 100%;
            display: none;
        }
        .msgdiv
        {
            position: fixed;
            left: 30%;
            right: 30%;
            top: 100px;
            height: 200px;
            background-color: #FCF4EA;
            border: solid 2px red;
            display: none;
        }
        .msg_title
        {
            position: absolute;
            text-align: center;
            left: 0px;
            right: 0px;
            top: 20px;
            height: 30px;
            line-height: 30px;
            font-size: 20px;
            font-weight: bolder;
        }
        .msg_content
        {
            position: absolute;
            background-color: #E3E6CF;
            text-align: left;
            font-family: 微软雅黑| 楷体;
            left: 10px;
            right: 10px;
            top: 55px;
            height: 130px;
            text-indent: 2em;
            padding: 5px;
        }
        .close_text
        {
            position: absolute;
            right: 0px;
            top: 2px;
            width: 42px;
            height: 20px;
            line-height: 20px;
            font-size: 14px;
            color: Red;
        }
        .table_style
        {
            background-color: #FBF7FE;
            width: 400px;
            margin: 0 auto;
            padding: 10px;
        }
        .topfloat
        {
            position: fixed;
            left: 0px;
            right: 0px;
            bottom: 0px;
            height: 30px;
            background-color: #FBE8EB;
        }
        .makeup /*补充topfloat层占用的底部空间*/
        {
            position: relative;
            height: 30px;
        }
        .hreflink
        {
            height: 30px;
            font-size: 17px;
            line-height: 30px;
            color: Olive;
        }

    </style>
</head>
<body>
    <div class="fulldiv" id="fullmask">

    </div>
</body>
</html>
